Electronic devices such as laptop computers, cellular telephones, and other equipment are sometimes provided with optical components. For example, an electronic device may have an ambient light sensor, an optical proximity sensor, image sensors, light sources, and other optical components.
It may sometimes be desirable to provide optical components with wavelength-dependent optical filters. For example, it may be desired to pass one color of light to a light sensor while blocking other colors of light. Organic color filters such as polymer layers with colored dye can be used in filtering light, but may not exhibit desired wavelength selectivity.